import { fetchClient } from '../httpClient'

//  销售方名称 弹窗列表数据接口
export const getRoutesList = () => {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve([
        {
          path: '/dashboard',
          name: 'dashboard',
          icon: 'dashboard',
          routes: [
            {
              path: '/dashboard',
              redirect: '/dashboard/analysis',
            },
            {
              name: 'analysis',
              icon: 'smile',
              path: '/dashboard/analysis',
              component: './dashboard/analysis',
            },
            {
              name: 'monitor',
              icon: 'smile',
              path: '/dashboard/monitor',
              component: './dashboard/monitor',
            },
            {
              name: 'workplace',
              icon: 'smile',
              path: '/dashboard/workplace',
              component: './dashboard/workplace',
            },
          ],
        },
        {
          path: '/form',
          name: '表单页',
          icon: 'form',
          routes: [
            {
              name: '基础表单',
              icon: 'smile',
              path: '/form/basic-form',
              component: './form/basic-form',
            },
            {
              name: '分步表单',
              icon: 'smile',
              path: '/form/step-form',
              component: './form/step-form',
            },
            {
              name: '高级表单',
              icon: 'smile',
              path: '/form/advanced-form',
              component: './form/advanced-form',
            },
          ],
        },
        {
          name: '动态路由测试',
          icon: 'experiment',
          path: '/dynamic-routes-demo',
          component: './DynamicRoutesDemo',
        },
      ]);
    }, 1000);
  });
};

//  销售方名称 弹窗列表数据接口
export const getRoutesListTex = async () => {
  return (await fetchClient.post<customizeApiResponse>('/api/routesList', {}));
}

